﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Galaktika.BI.Extensibility.Dom
{
    [XmlRoot(Namespace = Galaktika.BI.Silverlight.Common.Namespace)]
    public class BrickUserToolbar : BrickObject
    {
        //private string m_Name;
        //private string m_Title;
        private List<BrickComponent> m_ToolbarItems;

        public BrickUserToolbar()
        {
        }

        public BrickUserToolbar(string name)
            : this(name, name)
        {
        }

        public BrickUserToolbar(string name, string title)
            : base(name, title)
        {
        }

        #region Properties
        [XmlArray]
        [XmlArrayItem(typeof(BrickComponent))]
        public List<BrickComponent> ToolbarItems
        {
            get
            {
                if (this.m_ToolbarItems == null)
                {
                    this.m_ToolbarItems = new List<BrickComponent>();
                }

                return this.m_ToolbarItems;
            }
        }
        #endregion Properties
    }
}
